#pragma once
#include "render/rendertexture.h"
#include "file/file.h"

struct font_t
{
	rendertexture_t*	texture;
	float4 buv[256];
	float texture_width;
	float texture_height;
	int start_index;
	int num_chars;
	bool mono;
	stringhash name;

	uint32 gethashkey() const
	{
		return name.value;
	}

	font_t* nextinhashmap;

	void load_from(stringhash name, file_t* file);
};

void load_font(stringhash name, file_t* file);
void flush_fonts();
font_t* get_font(stringhash name);
